
# Charts for different thermistors.


temp_chart = {}
# This conversion table has been found in the datasheet for B57560G104F and is the one sold for MakerBot Plastruder MK4
temp_chart["B57560G104F"] = [[0.0, 333964. ], 
[2.63472, 295180. ], 
[4.79911, 265211. ], 
[6.58348, 242322. ], 
[8.07818, 224777. ], 
[9.37353, 210840. ], 
[10.553, 198919. ], 
[11.654, 188381. ], 
[12.6945, 178994. ], 
[13.6927, 170528. ], 
[14.6665, 162751. ], 
[15.6333, 155442. ], 
[16.6, 148501. ], 
[17.5667, 141908. ], 
[18.5333, 135645. ], 
[19.5, 129692. ], 
[20.4667, 124031. ], 
[21.4333, 118647. ], 
[22.4, 113525. ], 
[23.3667, 108653. ], 
[24.3333, 104016. ], 
[25.3, 99601.3 ], 
[26.2667, 95396.4 ], 
[27.2333, 91391. ], 
[28.2, 87575.4 ], 
[29.1667, 83939.5 ], 
[30.1333, 80473.5 ], 
[31.1, 77167.9 ], 
[32.0667, 74015.1 ], 
[33.0333, 71007.8 ], 
[34., 68138.6 ], 
[34.9667, 65400.2 ], 
[35.9333, 62785.4 ], 
[36.9, 60288.4 ], 
[37.8667, 57903.7 ], 
[38.8333, 55625.8 ], 
[39.8, 53449.2 ], 
[40.7667, 51368.5 ], 
[41.7333, 49379.1 ], 
[42.7, 47477. ], 
[43.6667, 45657.9 ], 
[44.6333, 43917.8 ], 
[45.6, 42252.5 ], 
[46.5667, 40658.4 ], 
[47.5333, 39132.6 ], 
[48.5, 37671.8 ], 
[49.4667, 36272.8 ], 
[50.4333, 34932.6 ], 
[51.4, 33648.5 ], 
[52.3667, 32417.9 ], 
[53.3333, 31238.4 ], 
[54.3, 30107.8 ], 
[55.2667, 29023.6 ], 
[56.2333, 27983.5 ], 
[57.2, 26985.8 ], 
[58.1667, 26028.6 ], 
[59.1333, 25110. ], 
[60.1, 24228.3 ], 
[61.0667, 23381.6 ], 
[62.0333, 22568.6 ], 
[63., 21787.7 ], 
[63.9667, 21037.7 ], 
[64.9333, 20317.1 ], 
[65.9, 19624.6 ], 
[66.8667, 18959. ], 
[67.8333, 18319.1 ], 
[68.8, 17704. ], 
[69.7667, 17112.4 ], 
[70.7333, 16543.3 ], 
[71.7, 15995.7 ], 
[72.6667, 15468.9 ], 
[73.6333, 14961.9 ], 
[74.6, 14473.9 ], 
[75.5667, 14004.1 ], 
[76.5333, 13551.6 ], 
[77.5, 13115.9 ], 
[78.4667, 12696.2 ], 
[79.4333, 12291.9 ], 
[80.4, 11902.4 ], 
[81.3667, 11526.9 ], 
[82.3333, 11165. ], 
[83.3, 10816.1 ], 
[84.2667, 10479.8 ], 
[85.2333, 10155.4 ], 
[86.2, 9842.58 ], 
[87.1667, 9540.79 ], 
[88.1333, 9249.64 ], 
[89.1, 8968.72 ], 
[90.0667, 8697.61 ], 
[91.0333, 8435.91 ], 
[92., 8183.26 ], 
[92.9667, 7939.33 ], 
[93.9333, 7703.77 ], 
[94.9, 7476.26 ], 
[95.8667, 7256.45 ], 
[96.8333, 7044.06 ], 
[97.8, 6838.83 ], 
[98.7667, 6640.48 ], 
[99.7333, 6448.76 ], 
[100.7, 6263.39 ], 
[101.667, 6084.15 ], 
[102.633, 5910.83 ], 
[103.6, 5743.22 ], 
[104.567, 5581.11 ], 
[105.533, 5424.29 ], 
[106.5, 5272.56 ], 
[107.467, 5125.75 ], 
[108.433, 4983.67 ], 
[109.4, 4846.15 ], 
[110.367, 4713. ], 
[111.333, 4584.06 ], 
[112.3, 4459.19 ], 
[113.267, 4338.26 ], 
[114.233, 4221.12 ], 
[115.2, 4107.65 ], 
[116.167, 3997.7 ], 
[117.133, 3891.17 ], 
[118.1, 3787.93 ], 
[119.067, 3687.87 ], 
[120.033, 3590.87 ], 
[121., 3496.83 ], 
[121.967, 3405.64 ], 
[122.933, 3317.22 ], 
[123.9, 3231.46 ], 
[124.867, 3148.28 ], 
[125.833, 3067.58 ], 
[126.8, 2989.28 ], 
[127.767, 2913.31 ], 
[128.733, 2839.61 ], 
[129.7, 2768.09 ], 
[130.667, 2698.69 ], 
[131.633, 2631.34 ], 
[132.6, 2565.95 ], 
[133.567, 2502.46 ], 
[134.533, 2440.8 ], 
[135.5, 2380.9 ], 
[136.467, 2322.68 ], 
[137.433, 2266.11 ], 
[138.4, 2211.14 ], 
[139.367, 2157.7 ], 
[140.333, 2105.75 ], 
[141.3, 2055.25 ], 
[142.267, 2006.16 ], 
[143.233, 1958.45 ], 
[144.2, 1912.07 ], 
[145.167, 1866.99 ], 
[146.133, 1823.17 ], 
[147.1, 1780.57 ], 
[148.067, 1739.15 ], 
[149.033, 1698.86 ], 
[150., 1659.67 ], 
[150.967, 1621.52 ], 
[151.933, 1584.39 ], 
[152.9, 1548.25 ], 
[153.867, 1513.06 ], 
[154.833, 1478.81 ], 
[155.8, 1445.47 ], 
[156.767, 1413. ], 
[157.733, 1381.38 ], 
[158.7, 1350.61 ], 
[159.667, 1320.65 ], 
[160.633, 1291.48 ], 
[161.6, 1263.08 ], 
[162.567, 1235.43 ], 
[163.533, 1208.51 ], 
[164.5, 1182.29 ], 
[165.467, 1156.76 ], 
[166.433, 1131.89 ], 
[167.4, 1107.65 ], 
[168.367, 1084.02 ], 
[169.333, 1060.98 ], 
[170.3, 1038.5 ], 
[171.267, 1016.56 ], 
[172.233, 995.144 ], 
[173.2, 974.254 ], 
[174.167, 953.877 ], 
[175.133, 934.005 ], 
[176.1, 914.628 ], 
[177.067, 895.731 ], 
[178.033, 877.301 ], 
[179., 859.322 ], 
[179.967, 841.781 ], 
[180.933, 824.663 ], 
[181.9, 807.956 ], 
[182.867, 791.651 ], 
[183.833, 775.737 ], 
[184.8, 760.201 ], 
[185.767, 745.034 ], 
[186.733, 730.227 ], 
[187.7, 715.771 ], 
[188.667, 701.656 ], 
[189.633, 687.875 ], 
[190.6, 674.419 ], 
[191.567, 661.278 ], 
[192.533, 648.444 ], 
[193.5, 635.906 ], 
[194.467, 623.656 ], 
[195.433, 611.684 ], 
[196.4, 599.982 ], 
[197.367, 588.545 ], 
[198.333, 577.366 ], 
[199.3, 566.44 ], 
[200.267, 555.762 ], 
[201.233, 545.325 ], 
[202.2, 535.123 ], 
[203.167, 525.151 ], 
[204.133, 515.404 ], 
[205.1, 505.874 ], 
[206.067, 496.557 ], 
[207.033, 487.447 ], 
[208., 478.537 ], 
[208.967, 469.823 ], 
[209.933, 461.298 ], 
[210.9, 452.956 ], 
[211.867, 444.794 ], 
[212.833, 436.807 ], 
[213.8, 428.99 ], 
[214.767, 421.339 ], 
[215.733, 413.85 ], 
[216.7, 406.52 ], 
[217.667, 399.345 ], 
[218.633, 392.323 ], 
[219.6, 385.451 ], 
[220.567, 378.725 ], 
[221.533, 372.143 ], 
[222.5, 365.7 ], 
[223.467, 359.391 ], 
[224.433, 353.213 ], 
[225.4, 347.161 ], 
[226.367, 341.231 ], 
[227.333, 335.421 ], 
[228.3, 329.729 ], 
[229.267, 324.154 ], 
[230.233, 318.692 ], 
[231.2, 313.342 ], 
[232.167, 308.101 ], 
[233.133, 302.967 ], 
[234.1, 297.939 ], 
[235.067, 293.014 ], 
[236.033, 288.189 ], 
[237., 283.461 ], 
[237.967, 278.826 ], 
[238.933, 274.282 ], 
[239.9, 269.823 ], 
[240.867, 265.448 ], 
[241.833, 261.155 ], 
[242.8, 256.944 ], 
[243.767, 252.815 ], 
[244.733, 248.768 ], 
[245.7, 244.804 ], 
[246.667, 240.92 ], 
[247.633, 237.113 ], 
[248.6, 233.38 ], 
[249.567, 229.719 ], 
[250.533, 226.126 ], 
[251.5, 222.601 ], 
[252.467, 219.141 ], 
[253.433, 215.747 ], 
[254.4, 212.418 ], 
[255.367, 209.152 ], 
[256.333, 205.949 ], 
[257.3, 202.807 ], 
[258.267, 199.724 ], 
[259.233, 196.696 ], 
[260.2, 193.722 ], 
[261.167, 190.801 ], 
[262.133, 187.933 ], 
[263.1, 185.116 ], 
[264.067, 182.352 ], 
[265.033, 179.641 ], 
[266., 176.981 ], 
[266.967, 174.371 ], 
[267.933, 171.809 ], 
[268.9, 169.293 ], 
[269.867, 166.821 ], 
[270.833, 164.39 ], 
[271.8, 162.001 ], 
[272.767, 159.652 ], 
[273.733, 157.345 ], 
[274.7, 155.078 ], 
[275.667, 152.853 ], 
[276.633, 150.668 ], 
[277.6, 148.524 ], 
[278.567, 146.418 ], 
[279.533, 144.351 ], 
[280.5, 142.322 ], 
[281.467, 140.329 ], 
[282.433, 138.371 ], 
[283.4, 136.447 ], 
[284.367, 134.556 ], 
[285.333, 132.695 ], 
[286.307, 130.852 ], 
[287.305, 128.996 ], 
[288.346, 127.097 ], 
[289.447, 125.122 ], 
[290.626, 123.04 ], 
[291.922, 120.796 ], 
[293.417, 118.274 ], 
[295.201, 115.35 ], 
[297.365, 111.9 ], 
[300., 107.8 ]]


temp_chart["QU-BD"] = [
[0, 324942], 
[1, 308535], 
[2, 293066], 
[3, 278476], 
[4, 264710], 
[5, 251717], 
[6, 239669], 
[7, 228277], 
[8, 217502], 
[9, 207307], 
[10, 197657], 
[11, 188489], 
[12, 179807], 
[13, 171580], 
[14, 163784], 
[15, 156392], 
[16, 149351], 
[17, 142671], 
[18, 136333], 
[19, 130318], 
[20, 124606], 
[21, 119171], 
[22, 114008], 
[23, 109101], 
[24, 104436], 
[25, 100000], 
[26, 95772], 
[27, 91749], 
[28, 87920], 
[29, 84274], 
[30, 80802], 
[31, 77446], 
[32, 74249], 
[33, 71205], 
[34, 68303], 
[35, 65538], 
[36, 62936], 
[37, 60453], 
[38, 58083], 
[39, 55821], 
[40, 53660], 
[41, 51524], 
[42, 49485], 
[43, 47539], 
[44, 45682], 
[45, 43908], 
[46, 42209], 
[47, 40585], 
[48, 39034], 
[49, 37551], 
[50, 36133], 
[51, 34780], 
[52, 33485], 
[53, 32246], 
[54, 31061], 
[55, 29925], 
[56, 28840], 
[57, 27800], 
[58, 26803], 
[59, 25848], 
[60, 24932], 
[61, 24047], 
[62, 23199], 
[63, 22385], 
[64, 21604], 
[65, 20855], 
[66, 20136], 
[67, 19446], 
[68, 18784], 
[69, 18147], 
[70, 17536], 
[71, 16944], 
[72, 16376], 
[73, 15829], 
[74, 15304], 
[75, 14799], 
[76, 14314], 
[77, 13847], 
[78, 13399], 
[79, 12967], 
[80, 12551], 
[81, 12149], 
[82, 11762], 
[83, 11390], 
[84, 11031], 
[85, 10686], 
[86, 10350], 
[87, 10027], 
[88, 9715], 
[89, 9414], 
[90, 9125], 
[91, 8845], 
[92, 8576], 
[93, 8316], 
[94, 8066], 
[95, 7824], 
[96, 7591], 
[97, 7365], 
[98, 7148], 
[99, 6938], 
[100, 6735], 
[101, 6538], 
[102, 6347], 
[103, 6163], 
[104, 5985], 
[105, 5813], 
[106, 5647], 
[107, 5487], 
[108, 5333], 
[109, 5183], 
[110, 5038], 
[111, 4898], 
[112, 4762], 
[113, 4630], 
[114, 4503], 
[115, 4380], 
[116, 4261], 
[117, 4146], 
[118, 4034], 
[119, 3926], 
[120, 3822], 
[121, 3719], 
[122, 3620], 
[123, 3525], 
[124, 3432], 
[125, 3342], 
[126, 3254], 
[127, 3170], 
[128, 3088], 
[129, 3009], 
[130, 2932], 
[131, 2856], 
[132, 2783], 
[133, 2713], 
[134, 2644], 
[135, 2577], 
[136, 2513], 
[137, 2450], 
[138, 2389], 
[139, 2330], 
[140, 2273], 
[141, 2217], 
[142, 2163], 
[143, 2111], 
[144, 2060], 
[145, 2010], 
[146, 1962], 
[147, 1915], 
[148, 1870], 
[149, 1826], 
[150, 1783], 
[151, 1739], 
[152, 1697], 
[153, 1655], 
[154, 1615], 
[155, 1576], 
[156, 1539], 
[157, 1502], 
[158, 1466], 
[159, 1431], 
[160, 1398], 
[161, 1365], 
[162, 1333], 
[163, 1302], 
[164, 1272], 
[165, 1243], 
[166, 1216], 
[167, 1189], 
[168, 1164], 
[169, 1139], 
[170, 1114], 
[171, 1091], 
[172, 1068], 
[173, 1045], 
[174, 1023], 
[175, 1002], 
[176, 981], 
[177, 961], 
[178, 941], 
[179, 921], 
[180, 903], 
[181, 883], 
[182, 864], 
[183, 846], 
[184, 828], 
[185, 810], 
[186, 793], 
[187, 777], 
[188, 760], 
[189, 744], 
[190, 729], 
[191, 714], 
[192, 699], 
[193, 685], 
[194, 671], 
[195, 657], 
[196, 644], 
[197, 631], 
[198, 619], 
[199, 606], 
[200, 594], 
[201, 582], 
[202, 570], 
[203, 559], 
[204, 547], 
[205, 536], 
[206, 526], 
[207, 515], 
[208, 505], 
[209, 495], 
[210, 485], 
[211, 476], 
[212, 466], 
[213, 457], 
[214, 448], 
[215, 440], 
[216, 431], 
[217, 423], 
[218, 415], 
[219, 407], 
[220, 399], 
[221, 392], 
[222, 385], 
[223, 377], 
[224, 370], 
[225, 363], 
[226, 357], 
[227, 350], 
[228, 344], 
[229, 337], 
[230, 331], 
[231, 325], 
[232, 319], 
[233, 313], 
[234, 308], 
[235, 302], 
[241, 271], 
[242, 267], 
[243, 262], 
[244, 257], 
[245, 253], 
[246, 249], 
[247, 244], 
[248, 240], 
[249, 236], 
[250, 232], 
[251, 228], 
[252, 224], 
[253, 220], 
[254, 216], 
[255, 213], 
[256, 209], 
[257, 205], 
[258, 202], 
[259, 198], 
[260, 195], 
[261, 192], 
[262, 188], 
[263, 185], 
[264, 182], 
[265, 179], 
[266, 176], 
[267, 173], 
[268, 170], 
[269, 168], 
[270, 165], 
[271, 162], 
[272, 159], 
[273, 157], 
[274, 154], 
[275, 152], 
[276, 149], 
[277, 147], 
[278, 145], 
[279, 142], 
[280, 140], 
[281, 138], 
[282, 136], 
[283, 134], 
[284, 132], 
[285, 130], 
[286, 128], 
[287, 126], 
[288, 124], 
[289, 122], 
[290, 120], 
[291, 118], 
[292, 116], 
[293, 115], 
[294, 113], 
[295, 111], 
[296, 109], 
[297, 108], 
[298, 106], 
[299, 105], 
[300, 103]]



temp_chart["B57561G0103F000"] = [
[0, 29255.8365974],
[1, 27921.0321822],
[2, 26656.1752442],
[3, 25457.1638156],
[4, 24320.1605627],
[5, 23241.5742345],
[6, 22218.0425107],
[7, 21246.4161377],
[8, 20323.7442477],
[9, 19447.2607673],
[10, 18614.3718297],
[11, 17822.6441103],
[12, 17069.7940139],
[13, 16353.6776466],
[14, 15672.2815118],
[15, 15023.7138746],
[16, 14406.1967421],
[17, 13818.0584141],
[18, 13257.72656],
[19, 12723.7217814],
[20, 12214.6516258],
[21, 11729.2050157],
[22, 11266.1470629],
[23, 10824.3142406],
[24, 10402.6098842],
[25, 10000.0],
[26, 9615.50935641],
[27, 9248.21783948],
[28, 8897.25705205],
[29, 8561.80713987],
[30, 8241.09382818],
[31, 7934.38565388],
[32, 7640.99137936],
[33, 7360.2575753],
[34, 7091.56636049],
[35, 6834.33328788],
[36, 6588.00536649],
[37, 6352.05921008],
[38, 6125.99930365],
[39, 5909.35637976],
[40, 5701.68589733],
[41, 5502.56661583],
[42, 5311.59925847],
[43, 5128.40525851],
[44, 4952.62558301],
[45, 4783.91962899],
[46, 4621.96418717],
[47, 4466.45246882],
[48, 4317.09319161],
[49, 4173.60972068],
[50, 4035.7392612],
[51, 3903.23209929],
[52, 3775.85088795],
[53, 3653.36997543],
[54, 3535.57477301],
[55, 3422.26115996],
[56, 3313.23492317],
[57, 3208.31122939],
[58, 3107.31412786],
[59, 3010.07608175],
[60, 2916.43752626],
[61, 2826.24645201],
[62, 2739.35801206],
[63, 2655.63415114],
[64, 2574.94325565],
[65, 2497.1598234],
[66, 2422.16415159],
[67, 2349.84204221],
[68, 2280.08452369],
[69, 2212.78758775],
[70, 2147.85194084],
[71, 2085.1827689],
[72, 2024.68951507],
[73, 1966.28566928],
[74, 1909.88856918],
[75, 1855.41921177],
[76, 1802.80207497],
[77, 1751.96494877],
[78, 1702.83877519],
[79, 1655.35749674],
[80, 1609.45791273],
[81, 1565.07954318],
[82, 1522.16449965],
[83, 1480.65736289],
[84, 1440.50506667],
[85, 1401.65678763],
[86, 1364.06384074],
[87, 1327.67958002],
[88, 1292.45930435],
[89, 1258.36016797],
[90, 1225.3410955],
[91, 1193.36270121],
[92, 1162.38721226],
[93, 1132.37839578],
[94, 1103.30148955],
[95, 1075.12313603],
[96, 1047.81131972],
[97, 1021.33530743],
[98, 995.665591609],
[99, 970.773836237],
[100, 946.632825474],
[101, 923.216414676],
[102, 900.499483779],
[103, 878.457892898],
[104, 857.068440023],
[105, 836.308820706],
[106, 816.157589651],
[107, 796.594124087],
[108, 777.598588855],
[109, 759.151903114],
[110, 741.235708579],
[111, 723.832339227],
[112, 706.924792391],
[113, 690.496701165],
[114, 674.532308076],
[115, 659.016439939],
[116, 643.934483853],
[117, 629.27236427],
[118, 615.016521093],
[119, 601.153888752],
[120, 587.671876206],
[121, 574.558347834],
[122, 561.801605164],
[123, 549.390369405],
[124, 537.313764749],
[125, 525.561302388],
[126, 514.122865238],
[127, 502.988693317],
[128, 492.149369749],
[129, 481.595807379],
[130, 471.31923595],
[131, 461.311189834],
[132, 451.563496275],
[133, 442.06826414],
[134, 432.817873132],
[135, 423.804963464],
[136, 415.022425963],
[137, 406.463392583],
[138, 398.121227314],
[139, 389.989517466],
[140, 382.062065315],
[141, 374.332880084],
[142, 366.796170265],
[143, 359.446336238],
[144, 352.277963203],
[145, 345.28581439],
[146, 338.464824545],
[147, 331.810093679],
[148, 325.316881065],
[149, 318.980599474],
[150, 312.796809643],
[151, 306.761214958],
[152, 300.86965635],
[153, 295.11810739],
[154, 289.502669575],
[155, 284.019567802],
[156, 278.665146013],
[157, 273.435863011],
[158, 268.328288441],
[159, 263.339098918],
[160, 258.465074308],
[161, 253.703094156],
[162, 249.050134239],
[163, 244.503263259],
[164, 240.059639655],
[165, 235.716508543],
[166, 231.471198759],
[167, 227.321120026],
[168, 223.263760217],
[169, 219.296682722],
[170, 215.417523916],
[171, 211.623990717],
[172, 207.913858234],
[173, 204.284967503],
[174, 200.735223307],
[175, 197.262592068],
[176, 193.865099827],
[177, 190.540830285],
[178, 187.287922927],
[179, 184.104571202],
[180, 180.989020773],
[181, 177.939567835],
[182, 174.954557483],
[183, 172.032382143],
[184, 169.17148006],
[185, 166.370333835],
[186, 163.627469016],
[187, 160.941452742],
[188, 158.310892423],
[189, 155.73443448],
[190, 153.210763118],
[191, 150.738599145],
[192, 148.316698837],
[193, 145.943852831],
[194, 143.618885064],
[195, 141.340651749],
[196, 139.108040377],
[197, 136.919968764],
[198, 134.775384124],
[199, 132.673262171],
[200, 130.612606258],
[201, 128.59244654],
[202, 126.611839165],
[203, 124.669865494],
[204, 122.765631346],
[205, 120.898266269],
[206, 119.066922829],
[207, 117.270775935],
[208, 115.50902217],
[209, 113.780879159],
[210, 112.085584948],
[211, 110.422397404],
[212, 108.790593639],
[213, 107.189469451],
[214, 105.618338777],
[215, 104.076533173],
[216, 102.563401305],
[217, 101.078308454],
[218, 99.6206360466],
[219, 98.1897811861],
[220, 96.7851562118],
[221, 95.4061882641],
[222, 94.0523188661],
[223, 92.7230035179],
[224, 91.4177113033],
[225, 90.1359245093],
[226, 88.8771382565],
[227, 87.6408601419],
[228, 86.4266098924],
[229, 85.233919028],
[230, 84.0623305371],
[231, 82.9113985602],
[232, 81.7806880839],
[233, 80.6697746441],
[234, 79.5782440385],
[235, 78.5056920468],
[236, 77.4517241605],
[237, 76.4159553203],
[238, 75.3980096609],
[239, 74.3975202646],
[240, 73.4141289207],
[241, 72.4474858935],
[242, 71.4972496964],
[243, 70.5630868723],
[244, 69.6446717816],
[245, 68.7416863954],
[246, 67.8538200951],
[247, 66.9807694782],
[248, 66.1222381688],
[249, 65.2779366349],
[250, 64.4475820097],
[251, 63.6308979192],
[252, 62.8276143135],
[253, 62.0374673046],
[254, 61.2601990068],
[255, 60.4955573837],
[256, 59.7432960979],
[257, 59.003174366],
[258, 58.2749568174],
[259, 57.5584133566],
[260, 56.8533190304]
]

